﻿namespace DelegatesExample
{
    using System;

    public delegate void DelegateExample();

    public class MainDelegatesExample
    {
        //// Using delegates write a class Timer that has can execute certain method at each t seconds.

        private static void Main()
        {
            Timer.Interval = 1;
            Timer.SecondInterval = 3;
            // Timer.ExecuteEachOneSec();
            
            TimerDelegate wtf = new TimerDelegate(Timer.ExecuteEachOneSec);
            wtf += Timer.ExecuteEachThreeSec;

            while (true)
            {
                wtf();
            }
        }
    }
}